
/*
 * Copyright (C) 2010 Bitglue. All rights reserved.
 *
 * $Id: ConsoleController.java bself $
 */

package com.bitglue.web.admin.webmvc;

import com.bitglue.web.admin.webmvc.model.ConsoleModel;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.servlet.ModelAndView;

/**
 * ConsoleController for handling display of admin console.
 * @author Bryan Patrick Self
 */
@Controller("consoleController")
@SessionAttributes(types = ConsoleModel.class)
public class ConsoleController {

    @RequestMapping(value = "/console.do")
    public ModelAndView consoleSetup(HttpServletRequest req) {
        ConsoleModel consoleModel = new ConsoleModel();
        return new ModelAndView("console", "consoleModel", consoleModel);
    }

    @RequestMapping(value = "/consoleHeader.do")
    public String consoleHeader() {
        return "consoleHeader";
    }


    @RequestMapping(value = "/consoleWelcome.do")
    public String consoleWelcome() {
        return "consoleWelcome";
    }

}
